import pandas as pd
df = pd.read_excel('店铺数据.xlsx')
df['评价数'] = df['评价数'].str.replace('条评价','').astype('int')
df['均价'] = df['均价'].str.replace('人均','').str.replace('元','')
df['所在区'] = df['所在区'].str.strip()
df = df.rename({'均价':'均价（元/人）'},axis='columns')
print(df)
df.drop_duplicates(subset=['店名'],inplace=True,ignore_index=True)
print(df)
df.dropna(inplace=True,ignore_index=True)
print(df)
print(len(df))
df.to_excel('处理后的数据.xlsx',index=False)
